package com.bidevalution.business.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bidevalution.business.service.BeBidFileService;
import com.bidevalution.dao.entity.BeBidFile;
import com.bidevalution.dao.entity.BeSectionEnterprise;
import com.bidevalution.dao.entity.BeSectionInfo;
import com.bidevalution.dao.mapper.BeBidFileMapper;
import com.bidevalution.dao.mapper.BeSectionEnterpriseMapper;
import com.bidevalution.dao.mapper.BeSectionInfoMapper;
import com.qtp.core.util.DateUtil;
@Service
public class BeBidFileServiceImpl implements BeBidFileService{
	@Autowired
	private BeBidFileMapper beBidFileMapper;
	@Autowired
	private BeSectionInfoMapper beSectionInfoMapper;
	@Autowired
	private BeSectionEnterpriseMapper beSectionEnterpriseMapper;
	@Override
	@Transactional
	public int insertSelective(BeBidFile record) {
		// TODO Auto-generated method stub
		return beBidFileMapper.insertSelective(record);
	}

	@Override
	public BeBidFile selectByPrimaryKey(String fileId) {
		// TODO Auto-generated method stub
		return beBidFileMapper.selectByPrimaryKey(fileId);
	}

	@Override
	public int updateByPrimaryKey(BeBidFile record) {
		return beBidFileMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<BeSectionInfo> selectByOrgCode(String orgCode,String startDate,String endDate) {
		// TODO Auto-generated method stub
		return beSectionInfoMapper.getListByOrgCode(orgCode,DateUtil.stringToDate(startDate+" 00:00:00", "yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate+" 23:59:59", "yyyy-MM-dd HH:mm:ss"));
	}

	@Override
	public List<BeSectionEnterprise> selectBySectionId(String sectionId, String enterpriseName) {
		return beSectionEnterpriseMapper.selectBySectionId(sectionId);
	}



	

}
